﻿using Abp.Domain.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.Core.Entities
{
    /// <summary>
    /// 商户信息
    /// </summary>
    [Table("Merchant_Info")]
    [Serializable]
    public class MerchantInfo : Entity<string>
    {
        /// <summary>
        /// 商户Id
        /// </summary>
        [Required]
        [StringLength(maximumLength: 32)]
        public override string Id
        {
            get
            {
                return base.Id;
            }

            set
            {
                base.Id = value;
            }
        }

        /// <summary>
        /// 商户名称
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string MerchantName { get; set; }

        /// <summary>
        /// 商户类型(1=企业,2=个体工商户,3=个人)
        /// </summary>
        [Range(1, 3, ErrorMessage = "商户类型无效")]
        public int MerchantType { get; set; }

        /// <summary>
        /// 收银台名称
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string CashierName { get; set; }

        /// <summary>
        /// 商标路径
        /// </summary>
        [MaxLength(255)]
        [Url]
        public string LogoUrl { get; set; }

        /// <summary>
        /// 状态(1表示正常)
        /// </summary>
        public int State { get; set; }

    }
}
